﻿@using PortalIntranet.InternalComponents.Configuration;
@using PortalIntranet.InternalComponents.Security;

@{
    CustomPrincipal principal = HttpContext.Current.User as CustomPrincipal;
}

<!DOCTYPE HTML>
<html lang="en-US">
<head>
    <meta charset="UTF-8" />
    <title>@AppSettings.Name</title>
    <meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <link rel="icon" type="image/ico" href="favicon.ico" />

    <!-- Bootstrap Framework Css -->
    <link rel="stylesheet" href="@Url.Content("~/Assets/bootstrap/css/bootstrap.min.css")">
    <link rel="stylesheet" href="@Url.Content("~/Assets/bootstrap/css/bootstrap-responsive.min.css")">

    <!-- IconSweet2 Icon Pack (16x16) -->
    <link rel="stylesheet" href="@Url.Content("~/Assets/img/icsw2_16/icsw2_16.css")">

    <!-- Splashy Icon Pack -->
    <link rel="stylesheet" href="@Url.Content("~/Assets/img/splashy/splashy.css")">

    <!-- Flag Icons -->
    <link rel="stylesheet" href="@Url.Content("~/Assets/img/flags/flags.css")">

    <!-- Power Tooltips -->
    <link rel="stylesheet" href="@Url.Content("~/Assets/js/lib/powertip/jquery.powertip.css")">

    <!-- Google Web Fonts -->
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Abel">
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300">

    <!-- Colorbox -->
    <link rel="stylesheet" href="@Url.Content("~/Assets/js/lib/colorbox/colorbox.css")">

    <!-- Fullcalendar -->
    <link rel="stylesheet" href="@Url.Content("~/Assets/js/lib/fullcalendar/fullcalendar_beoro.css")">

	<!-- Styles Font Awesome -->
	<link rel="stylesheet" href="@Url.Content("~/Assets/font-awesome/css/font-awesome.min.css")">

	<!-- Styles Application -->
    <link rel="stylesheet" href="@Url.Content("~/Content/Pages/layout.css")">

	<!--[if lte IE 8]><link rel="stylesheet" href="@Url.Content("~/Assets/css/ie8.css")"><![endif]-->
    <!--[if IE 9]><link rel="stylesheet" href="@Url.Content("~/Assets/css/ie9.css")"><![endif]-->

    @RenderSection("WebPartStyles", false)

</head>
<body class="bg_d">
    <!-- main wrapper (without footer) -->
    <div class="main-wrapper">
        <!-- top bar -->
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">
                    <div class="pull-right top-search">
                        <form action="">
                            <input type="text" name="q" id="q-main">
                            <button class="btn"><i class="icon-search"></i></button>
                        </form>
                    </div>
                    <div id="fade-menu" class="pull-left">
                        <ul class="clearfix" id="mobile-nav">
                            @{
                                foreach (var menu in ((CustomPrincipal)HttpContext.Current.User).Menus)
                                {
                                <li>
                                    <a href="@(string.IsNullOrWhiteSpace(menu.Uri.UrlAddress) ? "javascript:void(0)" : string.Format("{0}/{1}", AppSettings.UrlBase, menu.Uri.UrlAddress))">@menu.Nome</a>
                                    @{
                                        if (menu.SubMenus.Count > 0)
                                        {
                                            <ul>
                                            @{
                                                foreach (var submenu in menu.SubMenus)
                                                {
                                                    <li>
                                                        <a href="@(string.IsNullOrWhiteSpace(submenu.Uri.UrlAddress) ? "javascript:void(0)" : string.Format("{0}/{1}", AppSettings.UrlBase, submenu.Uri.UrlAddress))">@submenu.Nome</a>
                                                        @{
                                                            if (submenu.SubMenus.Count > 0)
                                                            {
                                                                <ul>
                                                                    @{
                                                                        foreach (var item in submenu.SubMenus)
                                                                        {
                                                                            <li>
                                                                                <a href="@(string.IsNullOrWhiteSpace(item.Uri.UrlAddress) ? "javascript:void(0)" : string.Format("{0}/{1}", AppSettings.UrlBase, item.Uri.UrlAddress))">@item.Nome</a>
                                                                            </li>
                                                                        }
                                                                    }
                                                                </ul>
                                                            }
                                                        }
                                                    </li>
                                                }
                                            }
                                            </ul>
                                        }
                                    }
                                </li>
                                }
                            }
                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <!-- header -->
        <header>
            <div class="container">
                <div class="row">
                    <div class="span3">
                        <div class="main-logo">
                            <a href="/Home">
                                <img src="@Url.Content(string.Format("{0}/Imagens/{1}", AppSettings.TemporaryFiles, principal.Empresa.Logo))" alt="@principal.Empresa.Nome"></a>
                        </div>
                    </div>
                    <div class="span5">
                        <nav class="nav-icons">
                            <ul>
                                <li><a href="javascript:void(0)" class="ptip_s" title="Dashboard"><i class="icsw16-home"></i></a></li>
                                <li class="dropdown">
                                    <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown"><i class="icsw16-create-write"></i><span class="caret"></span></a>
                                    <ul role="menu" class="dropdown-menu">
                                        <li role="presentation"><a href="#" role="menuitem">Action</a></li>
                                        <li role="presentation"><a href="#" role="menuitem">Another action</a></li>
                                        <li class="divider" role="presentation"></li>
                                        <li role="presentation"><a href="#" role="menuitem">Separated link</a></li>
                                    </ul>
                                </li>
                                <li><a href="javascript:void(0)" class="ptip_s" title="Mailbox"><i class="icsw16-mail"></i><span class="badge badge-info">6</span></a></li>
                                <li><a href="javascript:void(0)" class="ptip_s" title="Comments"><i class="icsw16-speech-bubbles"></i><span class="badge badge-important">14</span></a></li>
                                <li class="active"><span class="ptip_s" title="Statistics (active)"><i class="icsw16-graph"></i></span></li>
                                <li><a href="javascript:void(0)" class="ptip_s" title="Settings"><i class="icsw16-cog"></i></a></li>
                            </ul>
                        </nav>
                    </div>
                    <div class="span4">
                        <div class="user-box">
                            <div class="user-box-inner">
                                <img src="@Url.Content(string.Format("{0}/Avatars/{1}", AppSettings.TemporaryFiles, principal.Usuario.Avatar))" alt="" class="user-avatar img-avatar">
                                <div class="user-info">
                                    Bem vindo(a), <strong>@principal.Usuario.Nome</strong>
                                    <div class="last_access">@principal.Usuario.UltimoAcesso</div>
                                    <ul class="unstyled">
                                        <li><a href="user_profile.html">Configura&ccedil;&otilde;es</a></li>
                                        <li>&middot;</li>
                                        <li><a href="@Url.Action("Logoff", "Login")">Sair</a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </header>

        @RenderBody()
        <div class="footer_space"></div>
    </div>

    <!-- footer -->
    <footer>
        <div class="container">
            <div class="row">
                <div class="span5">
                    <div class="copy_rights">&copy; 2013 @principal.Empresa.Nome | Todos os direitos reservados.</div>
                </div>
                <div class="span7">
                    <ul class="unstyled">
                        <li><a href="@principal.Empresa.Site" target="_blank">Institucional</a></li>
                        <li>&middot;</li>
                        <li><a href="#">Second link</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </footer>

    <!-- Common JS -->
    <!--[if lt IE 9]>
        <script src="@Url.Content("~/Assets/js/ie/html5shiv.min.js")"></script>
        <script src="@Url.Content("~/Assets/js/ie/respond.min.js")"></script>
        <script src="@Url.Content("~/Assets/js/lib/flot-charts/excanvas.min.js")"></script>
    <![endif]-->

    <!-- jQuery Framework -->
    <script src="@Url.Content("~/Assets/js/jquery.min.js")"></script>
    <script src="@Url.Content("~/Assets/js/jquery-migrate.js")"></script>

    <!-- Bootstrap Framework Plugins -->
    <script src="@Url.Content("~/Assets/bootstrap/js/bootstrap.min.js")"></script>

    <!-- Top Menu -->
    <script src="@Url.Content("~/Assets/js/jquery.fademenu.js")"></script>

    <!-- Top Mobile Menu -->
    <script src="@Url.Content("~/Assets/js/selectnav.min.js")"></script>

    <!-- Actual Width/Height Of Hidden DOM Elements -->
    <script src="@Url.Content("~/Assets/js/jquery.actual.min.js")"></script>

    <!-- jQuery Easing Animations -->
    <script src="@Url.Content("~/Assets/js/jquery.easing.1.3.min.js")"></script>

    <!-- Power Tooltips -->
    <script src="@Url.Content("~/Assets/js/lib/powertip/jquery.powertip-1.1.0.min.js")"></script>

    <!-- Date Library -->
    <script src="@Url.Content("~/Assets/js/moment.min.js")"></script>

    <!-- jQuery UI -->
    <script src="@Url.Content("~/Assets/js/lib/jquery-ui/jquery-ui-1.10.2.custom.min.js")"></script>

    <!-- Touch Event Support For jQuery UI -->
    <script src="@Url.Content("~/Assets/js/lib/jquery-ui/jquery.ui.touch-punch.min.js")"></script>

    <!-- Colorbox -->
    <script src="@Url.Content("~/Assets/js/lib/colorbox/jquery.colorbox.min.js")"></script>

    <!-- Fullcalendar -->
    <script src="@Url.Content("~/Assets/js/lib/fullcalendar/fullcalendar.min.js")"></script>

    <!-- Flot Charts -->
    <script src="@Url.Content("~/Assets/js/lib/flot-charts/jquery.flot.js")"></script>
    <script src="@Url.Content("~/Assets/js/lib/flot-charts/jquery.flot.resize.js")"></script>
    <script src="@Url.Content("~/Assets/js/lib/flot-charts/jquery.flot.pie.js")"></script>
    <script src="@Url.Content("~/Assets/js/lib/flot-charts/jquery.flot.orderBars.js")"></script>
    <script src="@Url.Content("~/Assets/js/lib/flot-charts/jquery.flot.tooltip.js")"></script>
    <script src="@Url.Content("~/Assets/js/lib/flot-charts/jquery.flot.time.js")"></script>

    <!-- Responsive Carousel -->
    <script src="@Url.Content("~/Assets/js/lib/carousel/plugin.min.js")"></script>

    <!-- Responsive Image Grid -->
    <script src="@Url.Content("~/Assets/js/lib/wookmark/jquery.imagesloaded.min.js")"></script>
    <script src="@Url.Content("~/Assets/js/lib/wookmark/jquery.wookmark.min.js")"></script>

	<!-- Scripts Application -->
	<script src="@Url.Content("~/Scripts/Pages/layout.js")"></script>

    @RenderSection("WebPartScripts", false)
</body>
</html>
